<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Music Store</title>
<link type="text/css" rel="Stylesheet" href="style/front.css" />
<style type="text/css">
table {
	background-color: #F5F5F5;
	margin-left: 50px;
}
</style>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="header-logo">
				<a href="index.jsp"><img src="style/images/logo.png" alt=""></img></a>
			</div>
			<div id="header-login">
				<a href="register">注册</a> | <a href="login">登录</a>
			</div>
			<div class="clearBoth"></div>
			<div id="header-search">
				<form action="getAlbumTitle" method="get">
					<input id="keyword" name="title" type="text" /> <input
						id="btnSearch" type="submit" value="搜索" />
				</form>
			</div>
			<div id="header-nav">
				<ul>
					<li><a href="#">首页</a></li>
					<li><a href="#">商店</a></li>
					<li><a href="#">购物车</a></li>
					<li><a href="#">个人信息</a></li>
				</ul>
				<label id="welcome">您好,${user.userName}</label>
			</div>
		</div>
		<div id="content">
			<div id="sidebar">
				<h3>唱片分类</h3>
				<ul class="categories">
					<c:forEach items="${genrelist }" var="genre">
						<li><a href="#">${genre.name }</a></li>
					</c:forEach>
				</ul>
			</div>
			<div id="main">
				<h3 id="main-title">购物车</h3>
				<div id="hotAlbums">
					<table border="1" rules="all" bordercolor="#ffffff" width="560px">
						<tr>
							<td style="text-align: center">唱片</td>
							<td style="text-align: center">单价</td>
							<td style="text-align: center">数量</td>
							<td style="text-align: center">小计</td>
							<td style="text-align: center">删除</td>
						</tr>
						<c:forEach items="${albumlist }" var="album">
							<tr>
								<td style="text-align: center">${album.title }</td>
								<td style="text-align: center">${album.price }</td>
								<td style="text-align: center"><input type="text" size="5"
									value="${album.stock }" /></td>
								<td style="text-align: center">${album.price }*${album.stock }</td>
								<td style="text-align: center">
									<form action="" method="get">
										<input type="submit" value="删除" />
									</form>
								</td>
							</tr>
						</c:forEach>
						<tr>
							<td colspan="4" style="text-align: right;"><c:if
									test="${totalPages>0}">
									<c:if test="${page>1}">
										<a
											href="?page=${page-1}&gid=${param.gid}&title=${param.title}">[上一页]</a>
									</c:if>
									<c:if test="${page<=1}">
										<a>[上一页]</a>
									</c:if>
									<c:if test="${page<totalPages}">
										<a
											href="?page=${page+1}&gid=${param.gid}&title=${param.title}">[下一页]</a>
									</c:if>
									<c:if test="${page>=totalPages}">
										<a>[下一页]</a>
									</c:if>
										第 ${page} 页，共 ${totalPages} 页
									</c:if></td>
						</tr>
					</table>
				</div>
				<form action="order_affirm.jsp" style="">
					<input style="margin-left: 150px; margin-top: 10px;" type="submit"
						value="订单确认" />
				</form>
				<a href="index.jsp">继续购物</a>
			</div>
		</div>
		<div class="clearBoth"></div>
	</div>
	<div id="footer">
		<div id="footer-ad">
			<img src="${path }style/images/footer.png" alt=""></img>
		</div>
		<div id="footer-contactUs">
			<p>Music Store</p>
			<p>Design by Sam Chen, July,2011.</p>
		</div>
	</div>
	</div>
</body>
</html>
